import { GetterTree } from "vuex"; // 校验规则
import { ProfileState , RootState } from "../types";
export const getters: GetterTree<ProfileState, RootState> = {
    // foodNum:(state) =>(restaurant_id:number, category_id:number, item_id:number, food_id:number): number | undefined =>{
    //     let cart = state.cartList;
    //     if(cart.length !== 0){
    //         let shop = (cart[restaurant_id]);
    //         if(shop){
    //             let category = (shop[category_id ]);
    //             if(category){
    //                 let item = (category[item_id]);
    //                 if(item){
    //                     let food = item[food_id]
    //                     if(food){
    //                         console.log("ok",food['num'])
    //                         return food['num'];
    //                     }
    //                     return 0;
    //                 }
    //             }
    //         }
    //     }
    //     // console.log(2)
    //     return 0;
    // }
};
